home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 17 / AMIGAplus Sonderheft 17 (1999)(ICP)(DE)[!].iso / Rexx / AutoGetMail.rexx < prev    next >
OS/2 REXX Batch file  |  1997-11-08  |  1KB  |  33 lines

  1. /* A VERY simple AutoGetMail for AmiTCP and Thor
  2. ** USAGE: rx autogetmail [nodial]
  3. ** If someone would like to write a better one, please do and
  4. ** send it to me. I will include it in the next release of EZCron.
  5. ** Change the ThorMailBox variable to reflect the name of YOUR Thor system.
  6. ** Change the ms (mailserver) and ns (newsserver) vars accordingly.
  7. ** This script will execute startnet and will dial by default
  8. ** You MUST use the nodial option if you are already online
  9. */
  10.  
  11.     arg dial .
  12.     
  13.     ThorMailBox = 'mymail'
  14.     ms =     'news.iolinc.net'            /* MAIL SERVER */
  15.     ns =    'news.shasta.com'
  16. /*    ns =     '207.70.214.200'            /* NEWS SERVER */*/
  17.  
  18.     if dial ~= nodial then do
  19.         address command 'amitcp:bin/stopnet'    /*Takes AmiTCP offline*/
  20.         call delay(500)
  21.         address command 'amitcp:bin/startnet'   /*Puts AmiTCP online*/
  22.     end
  23.  
  24.     OPTIONS FAILAT 21
  25.  
  26.     address command 'thor:bin/sendtcp' ThorMailBox 'mailserver='ms 'newsserver='ns 'pubscreen workbench'
  27.     address command 'thor:bin/gettcp' ThorMailBox 'NONEWS pubscreen workbench'
  28.     address command 'thor:bin/gettcp' ThorMailBox 'NOMAIL pubscreen workbench'
  29.  
  30.     OPTIONS NO
  31.  
  32.     if dial ~= nodial then address command 'amitcp:bin/stopnet'    /*Takes AmiTCP offline*/
  33.